<script setup lang="ts">
import { onUnmounted } from 'vue';

const props: any = defineProps<{
    ujt: any;
}>();

const { $fn, $db } = props.ujt;

// 处理频道参数
const opt: any = {
    channel: 'channeltestfile',
    model: 'testkdd',
    one: 1,
    ty: 2,
};
const { initChannel } = $fn.useChannel({ ujt: props.ujt, opt });
initChannel();

onUnmounted(() => {
    $db[opt.channel] = null;
});
</script>

<template>
    <RouterView
        :ujt="ujt"
        :ty="2"
        :opt="opt"
        v-if="$db[opt.channel].stat"
    ></RouterView>
</template>

<style scoped lang="scss"></style>
